<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Lua环境 | To Share</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" href="/share/favicon.ico">
    <meta name="description" content="分享风雨，享受阳光">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/share/assets/css/0.styles.d7affcea.css" as="style"><link rel="preload" href="/share/assets/js/app.706684de.js" as="script"><link rel="preload" href="/share/assets/js/3.4685d505.js" as="script"><link rel="preload" href="/share/assets/js/1.b12738fb.js" as="script"><link rel="preload" href="/share/assets/js/52.b6653f73.js" as="script"><link rel="preload" href="/share/assets/js/9.4e81f08e.js" as="script"><link rel="prefetch" href="/share/assets/js/10.9e95ce7b.js"><link rel="prefetch" href="/share/assets/js/11.e99410dc.js"><link rel="prefetch" href="/share/assets/js/12.e9afe07c.js"><link rel="prefetch" href="/share/assets/js/13.078dd281.js"><link rel="prefetch" href="/share/assets/js/14.6575b8f0.js"><link rel="prefetch" href="/share/assets/js/15.d942bb10.js"><link rel="prefetch" href="/share/assets/js/16.fd8cc40c.js"><link rel="prefetch" href="/share/assets/js/17.f1b1f2c6.js"><link rel="prefetch" href="/share/assets/js/18.b312ce79.js"><link rel="prefetch" href="/share/assets/js/19.a99d170f.js"><link rel="prefetch" href="/share/assets/js/20.cda2b911.js"><link rel="prefetch" href="/share/assets/js/21.d6062607.js"><link rel="prefetch" href="/share/assets/js/22.5a50eee4.js"><link rel="prefetch" href="/share/assets/js/23.be601eed.js"><link rel="prefetch" href="/share/assets/js/24.3d0b9811.js"><link rel="prefetch" href="/share/assets/js/25.c1c35d96.js"><link rel="prefetch" href="/share/assets/js/26.9a8b03ff.js"><link rel="prefetch" href="/share/assets/js/27.6c302f3e.js"><link rel="prefetch" href="/share/assets/js/28.5eb55960.js"><link rel="prefetch" href="/share/assets/js/29.8297842b.js"><link rel="prefetch" href="/share/assets/js/30.b453256b.js"><link rel="prefetch" href="/share/assets/js/31.6ce2e46f.js"><link rel="prefetch" href="/share/assets/js/32.cf3906ab.js"><link rel="prefetch" href="/share/assets/js/33.83680f76.js"><link rel="prefetch" href="/share/assets/js/34.dada508c.js"><link rel="prefetch" href="/share/assets/js/35.11a36f17.js"><link rel="prefetch" href="/share/assets/js/36.fc43ef74.js"><link rel="prefetch" href="/share/assets/js/37.af715eba.js"><link rel="prefetch" href="/share/assets/js/38.7ba3e6e1.js"><link rel="prefetch" href="/share/assets/js/39.cd1c9d09.js"><link rel="prefetch" href="/share/assets/js/4.c1f99423.js"><link rel="prefetch" href="/share/assets/js/40.8df0c044.js"><link rel="prefetch" href="/share/assets/js/41.e643a418.js"><link rel="prefetch" href="/share/assets/js/42.d809cd4f.js"><link rel="prefetch" href="/share/assets/js/43.5136999f.js"><link rel="prefetch" href="/share/assets/js/44.315a82bf.js"><link rel="prefetch" href="/share/assets/js/45.a4b04306.js"><link rel="prefetch" href="/share/assets/js/46.2e8ec77e.js"><link rel="prefetch" href="/share/assets/js/47.d6bde2ca.js"><link rel="prefetch" href="/share/assets/js/48.e8e85c15.js"><link rel="prefetch" href="/share/assets/js/49.fce2ff19.js"><link rel="prefetch" href="/share/assets/js/5.599dfd12.js"><link rel="prefetch" href="/share/assets/js/50.3918e713.js"><link rel="prefetch" href="/share/assets/js/51.c5ddf50e.js"><link rel="prefetch" href="/share/assets/js/53.c0420367.js"><link rel="prefetch" href="/share/assets/js/54.0f64522f.js"><link rel="prefetch" href="/share/assets/js/55.1f9ce6fb.js"><link rel="prefetch" href="/share/assets/js/56.0a2fc30f.js"><link rel="prefetch" href="/share/assets/js/57.3b81efcb.js"><link rel="prefetch" href="/share/assets/js/58.c617dcad.js"><link rel="prefetch" href="/share/assets/js/59.5239e9d4.js"><link rel="prefetch" href="/share/assets/js/6.4e5676a9.js"><link rel="prefetch" href="/share/assets/js/60.b614d70b.js"><link rel="prefetch" href="/share/assets/js/61.f45be005.js"><link rel="prefetch" href="/share/assets/js/62.52121455.js"><link rel="prefetch" href="/share/assets/js/63.9f699597.js"><link rel="prefetch" href="/share/assets/js/64.01c4bf37.js"><link rel="prefetch" href="/share/assets/js/65.0f31fd4b.js"><link rel="prefetch" href="/share/assets/js/66.55dbbe80.js"><link rel="prefetch" href="/share/assets/js/67.fd9ba6df.js"><link rel="prefetch" href="/share/assets/js/68.c6c9e158.js"><link rel="prefetch" href="/share/assets/js/69.91757641.js"><link rel="prefetch" href="/share/assets/js/7.b8928c33.js"><link rel="prefetch" href="/share/assets/js/70.12f0a894.js"><link rel="prefetch" href="/share/assets/js/71.88c99794.js"><link rel="prefetch" href="/share/assets/js/72.e1d99c59.js"><link rel="prefetch" href="/share/assets/js/73.aee6f06a.js"><link rel="prefetch" href="/share/assets/js/74.b47532b0.js"><link rel="prefetch" href="/share/assets/js/75.1f1ab66e.js"><link rel="prefetch" href="/share/assets/js/8.56deb6eb.js">
    <link rel="stylesheet" href="/share/assets/css/0.styles.d7affcea.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container" data-v-130b300a><div data-v-130b300a><div class="password-shadow password-wrapper-out" style="display:none;" data-v-25ba6db2 data-v-130b300a data-v-130b300a><h3 class="title" data-v-25ba6db2 data-v-25ba6db2>To Share</h3> <p class="description" data-v-25ba6db2 data-v-25ba6db2>分享风雨，享受阳光</p> <label id="box" class="inputBox" data-v-25ba6db2 data-v-25ba6db2><input type="password" value="" data-v-25ba6db2> <span data-v-25ba6db2>Konck! Knock!</span> <button data-v-25ba6db2>OK</button></label> <div class="footer" data-v-25ba6db2 data-v-25ba6db2><span data-v-25ba6db2><i class="iconfont reco-theme" data-v-25ba6db2></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-25ba6db2>vuePress-theme-reco</a></span> <span data-v-25ba6db2><i class="iconfont reco-copyright" data-v-25ba6db2></i> <a data-v-25ba6db2><!---->
            
          <span data-v-25ba6db2>2018 - </span>
          2022
        </a></span></div></div> <div class="hide" data-v-130b300a><header class="navbar" data-v-130b300a><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/share/" class="home-link router-link-active"><!----> <span class="site-name">To Share</span></a> <div class="links"><div class="color-picker"><a class="color-button"><i class="iconfont reco-color"></i></a> <div class="color-picker-menu" style="display:none;"><div class="mode-options"><h4 class="title">Choose mode</h4> <ul class="color-mode-options"><li class="dark">dark</li><li class="auto active">auto</li><li class="light">light</li></ul></div></div></div> <div class="search-box"><i class="iconfont reco-search"></i> <input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/share/" class="nav-link"><i class="iconfont reco-home"></i>
  Home
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      Category
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/share/categories/docker/" class="nav-link"><i class="undefined"></i>
  docker
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/book/" class="nav-link"><i class="undefined"></i>
  book
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/flex/" class="nav-link"><i class="undefined"></i>
  flex
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/css/" class="nav-link"><i class="undefined"></i>
  css
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/git/" class="nav-link"><i class="undefined"></i>
  git
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/golang/" class="nav-link"><i class="undefined"></i>
  golang
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/gui/" class="nav-link"><i class="undefined"></i>
  gui
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/idea/" class="nav-link"><i class="undefined"></i>
  idea
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/js/" class="nav-link"><i class="undefined"></i>
  js
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/linux/" class="nav-link"><i class="undefined"></i>
  linux
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/mysql/" class="nav-link"><i class="undefined"></i>
  mysql
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/nodeJs/" class="nav-link"><i class="undefined"></i>
  nodeJs
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/php/" class="nav-link"><i class="undefined"></i>
  php
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/python/" class="nav-link"><i class="undefined"></i>
  python
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/site/" class="nav-link"><i class="undefined"></i>
  site
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/vue/" class="nav-link"><i class="undefined"></i>
  vue
</a></li></ul></div></div><div class="nav-item"><a href="/share/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  Tag
</a></div><div class="nav-item"><a href="/share/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  TimeLine
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      Docs
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/share/docs/git/" class="nav-link"><i class="undefined"></i>
  git
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/vue/" class="nav-link"><i class="undefined"></i>
  vue
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/flex/" class="nav-link"><i class="undefined"></i>
  css
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/js/" class="nav-link"><i class="undefined"></i>
  js
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/node/" class="nav-link"><i class="undefined"></i>
  nodeJs
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/docker/" class="nav-link"><i class="undefined"></i>
  docker
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/php/" class="nav-link"><i class="undefined"></i>
  php
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/linux/" class="nav-link router-link-active"><i class="undefined"></i>
  linux
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/python/" class="nav-link"><i class="undefined"></i>
  python
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/gui/" class="nav-link"><i class="undefined"></i>
  GUI
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/golang/" class="nav-link"><i class="undefined"></i>
  golang
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/idea/" class="nav-link"><i class="undefined"></i>
  idea
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/site/" class="nav-link"><i class="undefined"></i>
  site
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/book/" class="nav-link"><i class="undefined"></i>
  book
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/mysql/" class="nav-link"><i class="undefined"></i>
  mysql
</a></li></ul></div></div><div class="nav-item"><a href="https://gitee.com/zenglingchuan" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav></div></header> <div class="sidebar-mask" data-v-130b300a></div> <aside class="sidebar" data-v-130b300a><div class="personal-info-wrapper" data-v-39576ba9 data-v-130b300a><img src="/share/avatar.png" alt="author-avatar" class="personal-img" data-v-39576ba9> <!----> <div class="num" data-v-39576ba9><div data-v-39576ba9><h3 data-v-39576ba9>63</h3> <h6 data-v-39576ba9>文章</h6></div> <div data-v-39576ba9><h3 data-v-39576ba9>51</h3> <h6 data-v-39576ba9>标签</h6></div></div> <ul class="social-links" data-v-39576ba9></ul> <hr data-v-39576ba9></div> <nav class="nav-links"><div class="nav-item"><a href="/share/" class="nav-link"><i class="iconfont reco-home"></i>
  Home
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-category"></i>
      Category
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/share/categories/docker/" class="nav-link"><i class="undefined"></i>
  docker
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/book/" class="nav-link"><i class="undefined"></i>
  book
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/flex/" class="nav-link"><i class="undefined"></i>
  flex
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/css/" class="nav-link"><i class="undefined"></i>
  css
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/git/" class="nav-link"><i class="undefined"></i>
  git
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/golang/" class="nav-link"><i class="undefined"></i>
  golang
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/gui/" class="nav-link"><i class="undefined"></i>
  gui
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/idea/" class="nav-link"><i class="undefined"></i>
  idea
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/js/" class="nav-link"><i class="undefined"></i>
  js
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/linux/" class="nav-link"><i class="undefined"></i>
  linux
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/mysql/" class="nav-link"><i class="undefined"></i>
  mysql
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/nodeJs/" class="nav-link"><i class="undefined"></i>
  nodeJs
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/php/" class="nav-link"><i class="undefined"></i>
  php
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/python/" class="nav-link"><i class="undefined"></i>
  python
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/site/" class="nav-link"><i class="undefined"></i>
  site
</a></li><li class="dropdown-item"><!----> <a href="/share/categories/vue/" class="nav-link"><i class="undefined"></i>
  vue
</a></li></ul></div></div><div class="nav-item"><a href="/share/tag/" class="nav-link"><i class="iconfont reco-tag"></i>
  Tag
</a></div><div class="nav-item"><a href="/share/timeline/" class="nav-link"><i class="iconfont reco-date"></i>
  TimeLine
</a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title"><i class="iconfont reco-message"></i>
      Docs
    </span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/share/docs/git/" class="nav-link"><i class="undefined"></i>
  git
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/vue/" class="nav-link"><i class="undefined"></i>
  vue
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/flex/" class="nav-link"><i class="undefined"></i>
  css
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/js/" class="nav-link"><i class="undefined"></i>
  js
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/node/" class="nav-link"><i class="undefined"></i>
  nodeJs
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/docker/" class="nav-link"><i class="undefined"></i>
  docker
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/php/" class="nav-link"><i class="undefined"></i>
  php
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/linux/" class="nav-link router-link-active"><i class="undefined"></i>
  linux
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/python/" class="nav-link"><i class="undefined"></i>
  python
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/gui/" class="nav-link"><i class="undefined"></i>
  GUI
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/golang/" class="nav-link"><i class="undefined"></i>
  golang
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/idea/" class="nav-link"><i class="undefined"></i>
  idea
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/site/" class="nav-link"><i class="undefined"></i>
  site
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/book/" class="nav-link"><i class="undefined"></i>
  book
</a></li><li class="dropdown-item"><!----> <a href="/share/docs/mysql/" class="nav-link"><i class="undefined"></i>
  mysql
</a></li></ul></div></div><div class="nav-item"><a href="https://gitee.com/zenglingchuan" target="_blank" rel="noopener noreferrer" class="nav-link external"><i class="iconfont reco-mayun"></i>
  Gitee
  <span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav> <ul class="sidebar-links"><li><a href="/share/docs/linux/" aria-current="page" class="sidebar-link">linux常用操作</a></li><li><a href="/share/docs/linux/lnmp.html" class="sidebar-link">LNMP环境</a></li><li><a href="/share/docs/linux/lua.html" aria-current="page" class="active sidebar-link">Lua环境</a></li><li><a href="/share/docs/linux/work.html" class="sidebar-link">DevOps</a></li></ul> </aside> <div class="password-shadow password-wrapper-in" style="display:none;" data-v-25ba6db2 data-v-130b300a><h3 class="title" data-v-25ba6db2 data-v-25ba6db2>Lua环境</h3> <!----> <label id="box" class="inputBox" data-v-25ba6db2 data-v-25ba6db2><input type="password" value="" data-v-25ba6db2> <span data-v-25ba6db2>Konck! Knock!</span> <button data-v-25ba6db2>OK</button></label> <div class="footer" data-v-25ba6db2 data-v-25ba6db2><span data-v-25ba6db2><i class="iconfont reco-theme" data-v-25ba6db2></i> <a target="blank" href="https://vuepress-theme-reco.recoluan.com" data-v-25ba6db2>vuePress-theme-reco</a></span> <span data-v-25ba6db2><i class="iconfont reco-copyright" data-v-25ba6db2></i> <a data-v-25ba6db2><!---->
            
          <span data-v-25ba6db2>2018 - </span>
          2022
        </a></span></div></div> <div data-v-130b300a><main class="page"><section><div class="page-title"><h1 class="title">Lua环境</h1> <div data-v-f875f3fc><!----> <i class="iconfont reco-date" data-v-f875f3fc><span data-v-f875f3fc>2022/9/10</span></i> <!----> <i class="tags iconfont reco-tag" data-v-f875f3fc><span class="tag-item" data-v-f875f3fc>linux</span><span class="tag-item" data-v-f875f3fc>nginx</span><span class="tag-item" data-v-f875f3fc>lua</span><span class="tag-item" data-v-f875f3fc>swoole扩展</span></i></div></div> <div class="theme-reco-content content__default"><div id="boxx" data-v-f4ca0dac><div data-v-f4ca0dac><p v-if="true" class="custom-block-title" data-v-f4ca0dac></p> <p v-if="true" data-v-f4ca0dac></p></div></div> <div class="custom-block danger"><p class="title">系统信息</p><p>Centos7.6</p></div><h2 id="安装openresty"><a href="#安装openresty" class="header-anchor">#</a> 安装OpenResty</h2> <p><a href="https://openresty.org/cn/linux-packages.html#centos" target="_blank" rel="noopener noreferrer">安装资料参考<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></p> <blockquote><p>OpenResty® 是一个基于 Nginx 与 Lua 的高性能 Web 平台，其内部集成了大量精良的 Lua 库、第三方模块以及大多数的依赖项。用于方便地搭建能够处理超高并发、扩展性极高的动态 Web 应用、Web 服务和动态网关。</p></blockquote> <p><span style="color:blue;font-size:border;">下载openresty镜像仓库文件</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">wget</span> https://openresty.org/package/centos/openresty.repo
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">更换镜像仓库</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">sudo</span> <span class="token function">mv</span> openresty.repo /etc/yum.repos.d/
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">再次检查yum源且更新</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">sudo</span> yum check-update
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:red;font-size:border;">上面三步已经添加完成openresty镜像源, 可以直接使用安装软件包了</span></p> <p><span style="color:blue;font-size:border;">安装openresty</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">sudo</span> yum <span class="token function">install</span> -y openresty
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:red;font-size:border;">如下图所示, 表示安装完成!</span></p> <img src="/share/linux/09.png" alt="foo"> <h2 id="openresty常用指令"><a href="#openresty常用指令" class="header-anchor">#</a> openresty常用指令</h2> <div class="custom-block danger"><p class="title">注意</p><p>推荐使用这种方式操作openresty,操作了这个, 就是操作了nginx</p></div><ul><li>查看当前OpenResty的版本</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>openresty -v
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/1.png" alt="foo"> <ul><li>查看OpenResty的状态</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl status openresty 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>启动OpenResty</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl start openresty 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>开机启用</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl <span class="token builtin class-name">enable</span> openresty 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>开机禁用</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl disable openresty 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>停止OpenResty</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl stop openresty 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>热重启OpenResty</li></ul> <div class="custom-block danger"><p class="title">注意</p><p>如果配置文件修改了, 需要重启一下, 才能生效</p></div><div class="language-shell line-numbers-mode"><pre class="language-shell"><code>openresty -s reload
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>强制重启OpenResty</li></ul> <div class="custom-block danger"><p class="title">注意</p><p>如果配置文件改了,热重启不生效, 可以强制重启试一试</p></div><div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl restart openresty 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="openresty修改配置文件后重启失败"><a href="#openresty修改配置文件后重启失败" class="header-anchor">#</a> OpenResty修改配置文件后重启失败</h2> <div class="custom-block danger"><p class="title">注意</p><p>修改nginx配置文件后, 执行systemctl相关的重启, 启动, 停止指令失败原因</p></div><h3 id="nginx配置文件中修改了日志文件目录-但日志文件不存在"><a href="#nginx配置文件中修改了日志文件目录-但日志文件不存在" class="header-anchor">#</a> nginx配置文件中修改了日志文件目录, 但日志文件不存在</h3> <p style="color:#0000FF;font-weight:bolder;">`/var/log/nginx/error.log`文件找不到</p> <img src="/share/linux/23.png" alt="foo"> <h3 id="systemctl重启openresty超时"><a href="#systemctl重启openresty超时" class="header-anchor">#</a> systemctl重启openresty超时</h3> <div class="custom-block danger"><p class="title">特别注意</p><p>nginx配置文件中修改了pid文件存储路径,pid文件是每个进程都有一个全局唯一的id号, 但systemctl里面默认的pid文件路径不一致, 导致之后用systemctl之后个指令去重启或者启动OpenResty都会超时</p></div><p style="color:#0000FF;font-weight:bolder;">nginx.conf中pid的位置</p> <div class="language-text line-numbers-mode"><pre class="language-text"><code># 指定pid文件存储路径,pid文件是每个进程都有一个全局唯一的id号
pid  /var/run/nginx.pid;
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br></div></div><p style="color:#0000FF;font-weight:bolder;">openresty.service 文件位置</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/lib/systemd/system/openresty.service
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/24.png" alt="foo"> <p style="color:#0000FF;font-weight:bolder;">修改之后的openresty.service文件</p> <img src="/share/linux/25.png" alt="foo"> <p style="color:red;font-weight:bolder;">Warning: openresty.service changed on disk. Run 'systemctl daemon-reload' to reload units</p> <p>重新加载服务配置</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl daemon-reload
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p style="color:red;font-weight:bolder;">问题解决, 直接重启就能生效</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl restart openresty 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h3 id="启动报错的最后处理办法"><a href="#启动报错的最后处理办法" class="header-anchor">#</a> 启动报错的最后处理办法</h3> <blockquote><p>不用systemctl指令,直接操作openresty或nginx, 效果是一样的, 但多少有点逃避问题的悲剧感!!!</p></blockquote> <p>刷新OpenResty:</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/sbin/nginx -s reload
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p style="color:#0000FF;font-weight:bolder;">会报错:</p> <div class="language-text line-numbers-mode"><pre class="language-text"><code>nginx: [error] open() &quot;/usr/local/openresty/nginx/logs/nginx.pid&quot; failed (2: No such file or directory)

或者
#  启动nginx服务未启动成功
nginx: [alert] kill(9693, 1) failed (3: No such process
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br></div></div><p style="color:red;font-weight:bolder;">执行下面命令,重新加载nginx配置：</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p style="color:red;font-weight:bolder;">再次刷新 OpenResty</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/sbin/nginx -s reload
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="查看当前linux网络监听情况"><a href="#查看当前linux网络监听情况" class="header-anchor">#</a> 查看当前linux网络监听情况</h2> <div class="custom-block danger"><p class="title">注意</p><p>经常会用这个命令, 当配置出现问题的时候</p></div><div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">netstat</span> -ntlp   
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/13.png" alt="foo"> <h2 id="openresty启动-停止-重启"><a href="#openresty启动-停止-重启" class="header-anchor">#</a> openresty启动,停止,重启</h2> <blockquote><p>对openresty的操作, 实际上也是对nginx的操作,<code>openresty</code>已经加入环境变量了,直接使用就行</p></blockquote> <ul><li>启动openresty</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>openresty
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>修改配置后重新加载生效</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>openresty -s reload 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>完整有序的停止openresty</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>openresty -s quit
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>快速停止openresty</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>openresty -s stop
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="nginx的启动-停止-重启"><a href="#nginx的启动-停止-重启" class="header-anchor">#</a> nginx的启动, 停止, 重启</h2> <div class="custom-block danger"><p class="title">nginx版本的指令</p><p>openresty是nginx的luaJit的扩展，openresty的启动、停止、启动操作，实际执行nginx的操作就可以了。</p></div><ul><li>启动</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>快速停止</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/sbin/nginx -s stop
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>完整有序的停止nginx</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/sbin/nginx -s quit
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>修改配置后重新加载生效</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/sbin/nginx -s reload
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="openresty的包管理工具opm"><a href="#openresty的包管理工具opm" class="header-anchor">#</a> openresty的包管理工具opm</h2> <p><span style="color:blue;font-size:border;">下载安装</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">curl</span> https://raw.githubusercontent.com/openresty/opm/master/bin/opm <span class="token operator">&gt;</span> /usr/local/openresty/bin/opm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">给opm一个可执行权限</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">chmod</span> +x /usr/local/openresty/bin/opm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/10.png" alt="foo"> <p><span style="color:blue;font-size:border;">给opm做个软连接</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">ln</span> -s /usr/local/openresty/bin/opm /usr/local/bin/opm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">如果软连接不成功，需要安装安装了perl-Digest-MD5后，问题即可解决</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum -y <span class="token function">install</span> perl-Digest-MD5
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">查看是否连接成功</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>opm --help
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/11.png" alt="foo"> <h2 id="安装http请求库"><a href="#安装http请求库" class="header-anchor">#</a> 安装http请求库</h2> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>opm get agentzh/lua-resty-http
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">安装之后, 直接访问可以看到</span></p> <img src="/share/linux/12.png" alt="foo"> <h2 id="openresty内置nginx的配置"><a href="#openresty内置nginx的配置" class="header-anchor">#</a> openresty内置nginx的配置</h2> <p>centos7.6安装openresty后已经内置了nginx, 配置文件所在位置:</p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/local/openresty/nginx/conf/nginx.conf
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p style="color:#0000FF;font-weight:bolder;">原始配置文件内容</p> <div class="language-conf line-numbers-mode"><pre class="language-text"><code>
#user  nobody;
worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
worker_connections  1024;
}


http {
include       mime.types;
default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] &quot;$request&quot; '
    #                  '$status $body_bytes_sent &quot;$http_referer&quot; '
    #                  '&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';

    #access_log  logs/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm index.php;
        }

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
        #    proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
            #root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /usr/local/openresty/nginx/html$fastcgi_script_name;
            include        fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        #location ~ /\.ht {
        #    deny  all;
        #}
    }


    # another virtual host using mix of IP-, name-, and port-based configuration
    #
    #server {
    #    listen       8000;
    #    listen       somename:8080;
    #    server_name  somename  alias  another.alias;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}


    # HTTPS server
    #
    #server {
    #    listen       443 ssl;
    #    server_name  localhost;

    #    ssl_certificate      cert.pem;
    #    ssl_certificate_key  cert.key;

    #    ssl_session_cache    shared:SSL:1m;
    #    ssl_session_timeout  5m;

    #    ssl_ciphers  HIGH:!aNULL:!MD5;
    #    ssl_prefer_server_ciphers  on;

    #    location / {
    #        root   html;
    #        index  index.html index.htm;
    #    }
    #}

}
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br><span class="line-number">91</span><br><span class="line-number">92</span><br><span class="line-number">93</span><br><span class="line-number">94</span><br><span class="line-number">95</span><br><span class="line-number">96</span><br><span class="line-number">97</span><br><span class="line-number">98</span><br><span class="line-number">99</span><br><span class="line-number">100</span><br><span class="line-number">101</span><br><span class="line-number">102</span><br><span class="line-number">103</span><br><span class="line-number">104</span><br><span class="line-number">105</span><br><span class="line-number">106</span><br><span class="line-number">107</span><br><span class="line-number">108</span><br><span class="line-number">109</span><br><span class="line-number">110</span><br><span class="line-number">111</span><br><span class="line-number">112</span><br><span class="line-number">113</span><br><span class="line-number">114</span><br><span class="line-number">115</span><br><span class="line-number">116</span><br><span class="line-number">117</span><br></div></div><p style="color:#0000FF;font-weight:bolder;">优化之后的nginx配置文件</p> <div class="language-config line-numbers-mode"><pre class="language-text"><code>
# 使用的用户和组
user root;
# 指定工作进程数，一般为CPU总核数，或总核数的两倍, 直接设置为 auto, 会自动分配
worker_processes  auto;

# 错误日志路径， 日志记录级别：[ debug | info | notice | warn | error | crit]
error_log  /var/log/nginx/error.log warn;

# 指定pid文件存储路径,pid文件是每个进程都有一个全局唯一的id号
pid    	/var/run/nginx.pid;

# 指定进程能够打开的最大文件描述符数量，最好小于等于系统软限制
worker_rlimit_nofile 865535;

events {
        # 使用的网络I/O模型， select、poll、epoll（Linux推荐使用）、kqueue(FreeBSD 推荐使用)
	use epoll;
	# 允许的连接数，不能大于OS支持的最大句柄数
	worker_connections  865535;
}

http {
        #       前两行解决css, 视频流无法加载的问题, 互联网中web服务器与浏览器通讯时，
        #   所有数据都是需要指定文件类型(type)的，否则浏览器不知道用什么插件来处理这些数据，
        #   比如音频数据就要指定mid,.midi audio/midi,audio/x-midi等类型。
	include   	/usr/local/openresty/nginx/conf/mime.types;
	default_type  application/octet-stream;

        # 关闭访问日志
	access_log off;

	# access_log on;

	# map $http_x_forwarded_for  $clientRealIp { 
	# &quot;&quot;      $remote_addr; 
	# ~^(?P&lt;firstAddr&gt;[0-9\.]+),?.*$  $firstAddr; 
	# } 
	# log_format  main  '$clientRealIp - $remote_user [$time_local] &quot;$request&quot; '
        #              	'$status $body_bytes_sent &quot;$http_referer&quot; '
        #              	'&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;';

	# 指定日志文件路径
	# access_log  /var/log/nginx/access.log  main;

	limit_req_zone $binary_remote_addr zone=slow:30m rate=1000r/s;
	limit_req zone=slow burst=50 nodelay;
	limit_conn_log_level notice;
	limit_conn_status 503;

	sendfile        	on;
	tcp_nopush      	on;
	tcp_nodelay     	on;
	server_tokens       off;
	keepalive_timeout   65;
	types_hash_max_size 2048;

	server_names_hash_bucket_size 512;
	large_client_header_buffers 4 512k;
        client_max_body_size 2050m;        
	client_body_buffer_size 4096k;

 
        # 配置fastcgi模块来提供对php支持

        # 指定nginx与后端fastcgi server连接超时时间
	fastcgi_connect_timeout 300;
	# 指定nginx向后端传送请求超时时间
	fastcgi_send_timeout 300;
	# 指定nginx接受后端fastcgi响应请求超时时间 
	fastcgi_read_timeout 300;
	# 指定nginx读取fastcgi响应第一部分需要用多大的缓冲区
	fastcgi_buffer_size 256k;
	# 控制 nginx 最多创建 8 个大小为 256k 的缓冲区
	fastcgi_buffers 8 256k;
	# 整个数据请求需要多大的缓存区，建议设置为fastcgi_buffers值的两倍
	fastcgi_busy_buffers_size 256k;
	# 写入缓存文件使用多大的数据块，默认值是fastcgi_buffer值的2倍
	fastcgi_temp_file_write_size 256k;

	gzip on;
	gzip_min_length  1k;
	gzip_buffers 	4 16k;
	gzip_http_version 1.0;
	gzip_comp_level 2;
	gzip_types   	text/plain application/x-javascript text/css application/xml;
	gzip_vary on;

	open_file_cache max=655350 inactive=600s;
	open_file_cache_min_uses 1;
	open_file_cache_valid 80s;
	open_file_cache_errors on;
	include /etc/nginx/conf.d/*.conf;
}


</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br><span class="line-number">78</span><br><span class="line-number">79</span><br><span class="line-number">80</span><br><span class="line-number">81</span><br><span class="line-number">82</span><br><span class="line-number">83</span><br><span class="line-number">84</span><br><span class="line-number">85</span><br><span class="line-number">86</span><br><span class="line-number">87</span><br><span class="line-number">88</span><br><span class="line-number">89</span><br><span class="line-number">90</span><br><span class="line-number">91</span><br><span class="line-number">92</span><br><span class="line-number">93</span><br><span class="line-number">94</span><br><span class="line-number">95</span><br><span class="line-number">96</span><br></div></div><h2 id="laravel项目配置文件"><a href="#laravel项目配置文件" class="header-anchor">#</a> laravel项目配置文件</h2> <blockquote><p>因为之前 <code>nginx.conf</code> 配置文件 <code>include /etc/nginx/conf.d/*.conf;</code>了, 所在现在去这个目录里面添加配置文件</p></blockquote> <p style="color:#0000FF;font-weight:bolder;">test.conf</p> <div class="language-config line-numbers-mode"><pre class="language-text"><code>
server
{
    listen 80;   
    server_name localhost;
    # root根目录配置到入口文件里面,入口文件在哪, 就配置在哪
    root  /home/wwwroot/chat/public;

    error_page   404   /404.html;


    location / { 
        index index.php index.htm index.html default.html default.htm default.php;
  	     # laravel伪静态
  	    try_files $uri $uri/ /index.php?$query_string; 
    }        

          
    location ~ \.php(.*)$ {
         #  支持吃http协议  127.0.0.1:9000;
         fastcgi_pass   127.0.0.1:9000;
         fastcgi_index  index.php;
         # SCRIPT_FILENAME  laravel配置脚本运行根目录,不配置容易出现404,
         fastcgi_param  SCRIPT_FILENAME  /home/wwwroot/chat/public$fastcgi_script_name;
         
         fastcgi_param  QUERY_STRING       $query_string;
         fastcgi_param  REQUEST_METHOD     $request_method;
         fastcgi_param  CONTENT_TYPE       $content_type;
         fastcgi_param  CONTENT_LENGTH     $content_length;

         fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
         fastcgi_param  REQUEST_URI        $request_uri;
         fastcgi_param  DOCUMENT_URI       $document_uri;
         fastcgi_param  DOCUMENT_ROOT      $document_root;
         fastcgi_param  SERVER_PROTOCOL    $server_protocol;
         fastcgi_param  REQUEST_SCHEME     $scheme;
         fastcgi_param  HTTPS              $https if_not_empty;

         fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
         fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

         fastcgi_param  REMOTE_ADDR        $remote_addr;
         fastcgi_param  REMOTE_PORT        $remote_port;
         fastcgi_param  SERVER_ADDR        $server_addr;
         fastcgi_param  SERVER_PORT        $server_port;
         fastcgi_param  SERVER_NAME        $server_name;

         # PHP only, required if PHP was built with --enable-force-cgi-redirect
         fastcgi_param  REDIRECT_STATUS    200;   


    }

    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
    }

    location ~ .*\.(js|css)?$
    {
        expires      12h;
    }

    location ~ /.well-known {
        allow all;
    }

    location ~ /\.
    {
        deny all;
    }

    access_log off;
}



</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br><span class="line-number">27</span><br><span class="line-number">28</span><br><span class="line-number">29</span><br><span class="line-number">30</span><br><span class="line-number">31</span><br><span class="line-number">32</span><br><span class="line-number">33</span><br><span class="line-number">34</span><br><span class="line-number">35</span><br><span class="line-number">36</span><br><span class="line-number">37</span><br><span class="line-number">38</span><br><span class="line-number">39</span><br><span class="line-number">40</span><br><span class="line-number">41</span><br><span class="line-number">42</span><br><span class="line-number">43</span><br><span class="line-number">44</span><br><span class="line-number">45</span><br><span class="line-number">46</span><br><span class="line-number">47</span><br><span class="line-number">48</span><br><span class="line-number">49</span><br><span class="line-number">50</span><br><span class="line-number">51</span><br><span class="line-number">52</span><br><span class="line-number">53</span><br><span class="line-number">54</span><br><span class="line-number">55</span><br><span class="line-number">56</span><br><span class="line-number">57</span><br><span class="line-number">58</span><br><span class="line-number">59</span><br><span class="line-number">60</span><br><span class="line-number">61</span><br><span class="line-number">62</span><br><span class="line-number">63</span><br><span class="line-number">64</span><br><span class="line-number">65</span><br><span class="line-number">66</span><br><span class="line-number">67</span><br><span class="line-number">68</span><br><span class="line-number">69</span><br><span class="line-number">70</span><br><span class="line-number">71</span><br><span class="line-number">72</span><br><span class="line-number">73</span><br><span class="line-number">74</span><br><span class="line-number">75</span><br><span class="line-number">76</span><br><span class="line-number">77</span><br></div></div><h2 id="yum安装php8-2"><a href="#yum安装php8-2" class="header-anchor">#</a> yum安装php8.2</h2> <ul><li>安装remi扩展源</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> -y http://rpms.remirepo.net/enterprise/remi-release-9.rpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">网不好, 可以用清华软件源</span></p> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum <span class="token function">install</span> https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-9.rpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>查看能安装的php8.2和相关插件(把自己需要的, 根据查到的, 安装一下就可以)</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum list <span class="token operator">|</span> <span class="token function">grep</span> php82
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>yum安装</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum -y <span class="token function">install</span> −−enablerepo<span class="token operator">=</span>remi-php82 php82 php82-php php82-php-devel php82-php-xml php82-php-fpm php82-php-pecl-apcu php82-php-mbstring php82-php-gd php82-php-json php82-php-pecl-json-post php82-php-pdo php82-php-mysqlnd php82-php-opcache php82-php-pear php82-php-soap php82-php-intl php82-php-pear
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>确认安装结果</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>yum list installed <span class="token operator">|</span> <span class="token function">grep</span> php
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>查看当前php版本</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/usr/bin/php82 -v 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>通过remi安装的php的指令是<code>/usr/bin/php82</code></li></ul> <img src="/share/linux/14.png" alt="foo"> <ul><li>给php82建立一个软连接</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">ln</span> -sf /usr/bin/php82 /usr/bin/php
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><p><span style="color:blue;font-size:border;">之后就可以直接使用php这个指令了</span></p> <img src="/share/linux/15.png" alt="foo"> <h2 id="php-fpm启动-停止-重启"><a href="#php-fpm启动-停止-重启" class="header-anchor">#</a> php-fpm启动,停止,重启</h2> <div class="custom-block danger"><p class="title">注意</p><p>更改了 php.ini 文件后，如何 stop、restart 或者 reload PHP-FPM，以使修改生效。</p></div><blockquote><p>之前安装了, php-fpm也顺带安装好了</p></blockquote> <ul><li>启动php-fpm（有需要的话可以给服务改名，我这边就没改了）</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl start php82-php-fpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/16.png" alt="foo"> <ul><li>设置为开机自启动</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl <span class="token builtin class-name">enable</span> php82-php-fpm 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>重载(平滑重启)php-fpm</li></ul> <div class="custom-block danger"><p class="title">注意</p><p>reload表示的是重新加载配置，首先reload不会影响当前服务已经建立的会话，而是直接加载新的配置，当新的会话产生后，会使用新的信息的配置；即使配置文件错误，导致的结果只是配置加载失败，而与所提供的服务无关。</p></div><div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl reload php82-php-fpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>重启php-fpm</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl restart php82-php-fpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>停止php-fpm</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl stop php82-php-fpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>查看php-fpm状态</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl status php82-php-fpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="php配置文件"><a href="#php配置文件" class="header-anchor">#</a> php配置文件</h2> <ul><li>phpize所在目录, 安装扩展的时候, 需要执行phpize</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/opt/remi/php82/root/bin/phpize
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>php配置路径</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/opt/remi/php82/root/bin/php-config
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>php-fpm配置文件所在目录</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/etc/opt/remi/php82/php-fpm.d/www.conf
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>php配置文件</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/etc/opt/remi/php82/php.ini
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><h2 id="php源码编译安装swoole扩展"><a href="#php源码编译安装swoole扩展" class="header-anchor">#</a> php源码编译安装swoole扩展</h2> <ul><li>去git或者gitee下载swoole源码文件, 并上传到服务器</li></ul> <img src="/share/linux/17.png" alt="foo"> <ul><li>切换进源码根目录,执行phpize,建立php的外挂模块</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>/opt/remi/php82/root/bin/phpize
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/18.png" alt="foo"> <ul><li>指定php配置路径</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>./configure --with-php-config<span class="token operator">=</span>/opt/remi/php82/root/bin/php-config 
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>编译安装</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code><span class="token function">make</span> <span class="token operator">&amp;&amp;</span> <span class="token function">make</span> <span class="token function">install</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/19.png" alt="foo"> <ul><li>把swoole扩展加入到php配置文件</li></ul> <img src="/share/linux/20.png" alt="foo"> <ul><li>重启php-fpm, swoole扩展生效</li></ul> <div class="language-shell line-numbers-mode"><pre class="language-shell"><code>systemctl restart php82-php-fpm
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><ul><li>验证swoole安装成功与否</li></ul> <div class="custom-block danger"><p class="title">注意</p><p>Swoole 是运行在 linux 的 cli 模式下的</p></div><div class="language-shell line-numbers-mode"><pre class="language-shell"><code>php --ri swoole
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br></div></div><img src="/share/linux/26.png" alt="foo"> <p style="color:#0000FF;font-weight:bolder;">下面这两种验证方式, 有没有成功, 结果都不重要了, 只要cli命令下成功就可以!!!</p> <img src="/share/linux/22.png" alt="foo"> <p>或者</p> <img src="/share/linux/21.png" alt="foo"></div></section> <footer class="page-edit"><!----> <div class="last-updated"><span class="prefix">Last Updated: </span> <span class="time">2022/9/21 16:08:51</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev"><a href="/share/docs/linux/lnmp.html" class="prev">
            LNMP环境
          </a></span> <span class="next"><a href="/share/docs/linux/work.html">
            DevOps
          </a></span></p></div> <div class="comments-wrapper"><!----></div> <ul class="side-bar sub-sidebar-wrapper" style="width:12rem;" data-v-cb1513f6><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#安装openresty" class="sidebar-link reco-side-安装openresty" data-v-cb1513f6>安装OpenResty</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#openresty常用指令" class="sidebar-link reco-side-openresty常用指令" data-v-cb1513f6>openresty常用指令</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#openresty修改配置文件后重启失败" class="sidebar-link reco-side-openresty修改配置文件后重启失败" data-v-cb1513f6>OpenResty修改配置文件后重启失败</a></li><li class="level-3" data-v-cb1513f6><a href="/share/docs/linux/lua.html#nginx配置文件中修改了日志文件目录-但日志文件不存在" class="sidebar-link reco-side-nginx配置文件中修改了日志文件目录-但日志文件不存在" data-v-cb1513f6>nginx配置文件中修改了日志文件目录, 但日志文件不存在</a></li><li class="level-3" data-v-cb1513f6><a href="/share/docs/linux/lua.html#systemctl重启openresty超时" class="sidebar-link reco-side-systemctl重启openresty超时" data-v-cb1513f6>systemctl重启openresty超时</a></li><li class="level-3" data-v-cb1513f6><a href="/share/docs/linux/lua.html#启动报错的最后处理办法" class="sidebar-link reco-side-启动报错的最后处理办法" data-v-cb1513f6>启动报错的最后处理办法</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#查看当前linux网络监听情况" class="sidebar-link reco-side-查看当前linux网络监听情况" data-v-cb1513f6>查看当前linux网络监听情况</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#openresty启动-停止-重启" class="sidebar-link reco-side-openresty启动-停止-重启" data-v-cb1513f6>openresty启动,停止,重启</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#nginx的启动-停止-重启" class="sidebar-link reco-side-nginx的启动-停止-重启" data-v-cb1513f6>nginx的启动, 停止, 重启</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#openresty的包管理工具opm" class="sidebar-link reco-side-openresty的包管理工具opm" data-v-cb1513f6>openresty的包管理工具opm</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#安装http请求库" class="sidebar-link reco-side-安装http请求库" data-v-cb1513f6>安装http请求库</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#openresty内置nginx的配置" class="sidebar-link reco-side-openresty内置nginx的配置" data-v-cb1513f6>openresty内置nginx的配置</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#laravel项目配置文件" class="sidebar-link reco-side-laravel项目配置文件" data-v-cb1513f6>laravel项目配置文件</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#yum安装php8-2" class="sidebar-link reco-side-yum安装php8-2" data-v-cb1513f6>yum安装php8.2</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#php-fpm启动-停止-重启" class="sidebar-link reco-side-php-fpm启动-停止-重启" data-v-cb1513f6>php-fpm启动,停止,重启</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#php配置文件" class="sidebar-link reco-side-php配置文件" data-v-cb1513f6>php配置文件</a></li><li class="level-2" data-v-cb1513f6><a href="/share/docs/linux/lua.html#php源码编译安装swoole扩展" class="sidebar-link reco-side-php源码编译安装swoole扩展" data-v-cb1513f6>php源码编译安装swoole扩展</a></li></ul></main> <!----></div></div></div></div><div class="global-ui"><div class="back-to-ceiling" style="right:1rem;bottom:6rem;width:2.5rem;height:2.5rem;border-radius:.25rem;line-height:2.5rem;display:none;" data-v-c6073ba8 data-v-c6073ba8><svg t="1574745035067" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5404" class="icon" data-v-c6073ba8><path d="M526.60727968 10.90185116a27.675 27.675 0 0 0-29.21455937 0c-131.36607665 82.28402758-218.69155461 228.01873535-218.69155402 394.07834331a462.20625001 462.20625001 0 0 0 5.36959153 69.94390903c1.00431239 6.55289093-0.34802892 13.13561351-3.76865779 18.80351572-32.63518765 54.11355614-51.75690182 118.55860487-51.7569018 187.94566865a371.06718723 371.06718723 0 0 0 11.50484808 91.98906777c6.53300375 25.50556257 41.68394495 28.14064038 52.69160883 4.22606766 17.37162448-37.73630017 42.14135425-72.50938081 72.80769204-103.21549295 2.18761121 3.04276886 4.15646224 6.24463696 6.40373557 9.22774369a1871.4375 1871.4375 0 0 0 140.04691725 5.34970492 1866.36093723 1866.36093723 0 0 0 140.04691723-5.34970492c2.24727335-2.98310674 4.21612437-6.18497483 6.3937923-9.2178004 30.66633723 30.70611158 55.4360664 65.4791928 72.80769147 103.21549355 11.00766384 23.91457269 46.15860503 21.27949489 52.69160879-4.22606768a371.15156223 371.15156223 0 0 0 11.514792-91.99901164c0-69.36717486-19.13165746-133.82216804-51.75690182-187.92578088-3.42062944-5.66790279-4.76302748-12.26056868-3.76865837-18.80351632a462.20625001 462.20625001 0 0 0 5.36959269-69.943909c-0.00994388-166.08943902-87.32547796-311.81420293-218.6915546-394.09823051zM605.93803103 357.87693858a93.93749974 93.93749974 0 1 1-187.89594924 6.1e-7 93.93749974 93.93749974 0 0 1 187.89594924-6.1e-7z" p-id="5405" data-v-c6073ba8></path><path d="M429.50777625 765.63860547C429.50777625 803.39355007 466.44236686 1000.39046097 512.00932183 1000.39046097c45.56695499 0 82.4922232-197.00623328 82.5015456-234.7518555 0-37.75494459-36.9345906-68.35043303-82.4922232-68.34111062-45.57627738-0.00932239-82.52019037 30.59548842-82.51086798 68.34111062z" p-id="5406" data-v-c6073ba8></path></svg></div><!----><div class="kanbanniang" data-v-5775ee02><div class="banniang-container" style="display:;" data-v-5775ee02><div class="messageBox" style="left:68px;bottom:370px;display:none;" data-v-5775ee02>
      欢迎来到我的博客
    </div> <div class="operation" style="right:90px;bottom:40px;display:none;" data-v-5775ee02><i class="kbnfont kbn-ban-home ban-home" data-v-5775ee02></i> <i class="kbnfont kbn-ban-message message" data-v-5775ee02></i> <i class="kbnfont kbn-ban-close close" data-v-5775ee02></i> <a target="_blank" href="https://vuepress-theme-reco.recoluan.com/views/plugins/kanbanniang.html" data-v-5775ee02><i class="kbnfont kbn-ban-info info" data-v-5775ee02></i></a> <i class="kbnfont kbn-ban-theme skin" style="display:;" data-v-5775ee02></i></div> <canvas id="banniang" width="260px" height="420" class="live2d" style="right:200px;bottom:20px;opacity:0.4;" data-v-5775ee02></canvas></div> <div class="showBanNiang" style="display:none;" data-v-5775ee02>
    看板娘
  </div></div><canvas id="vuepress-canvas-cursor"></canvas><!----><div class="RibbonAnimation"></div><!----></div></div>
    <script src="/share/assets/js/app.706684de.js" defer></script><script src="/share/assets/js/3.4685d505.js" defer></script><script src="/share/assets/js/1.b12738fb.js" defer></script><script src="/share/assets/js/52.b6653f73.js" defer></script><script src="/share/assets/js/9.4e81f08e.js" defer></script>
  </body>
</html>
